this._updateCancelButton();
- let batch = new Batch.ConcurrentBatch(this, [GdmUtil.cloneAndFadeOutActor(this._userSelectionBox),
- this._beginVerificationForItem(activatedItem)]);
+ const batch = new Batch.ConcurrentBatch(this, [
+ GdmUtil.cloneAndFadeOutActor(this._userSelectionBox),
+ this._beginVerificationForItem(activatedItem),
+ ]);
batch.run();
}
}
function extractBootTimestamp() {
- let sp = Gio.Subprocess.new(['journalctl', '-b',
- 'MESSAGE_ID=7d4958e842da4a758f6c1cdc7b36dcc5',
- 'UNIT=graphical.target',
- '-o',
- 'json'],
- Gio.SubprocessFlags.STDOUT_PIPE);
+ const sp = Gio.Subprocess.new([
+ 'journalctl', '-b',
+ 'MESSAGE_ID=7d4958e842da4a758f6c1cdc7b36dcc5',
+ 'UNIT=graphical.target',
+ '-o',
+ 'json',
+ ], Gio.SubprocessFlags.STDOUT_PIPE);
let result = null;
let datastream = Gio.DataInputStream.new(sp.get_stdout_pipe());
let connectionSetting = connection.get_setting_connection();
- let argv = [authHelper.fileName,
- '-u', connectionSetting.uuid,
- '-n', connectionSetting.id,
- '-s', serviceType];
+ const argv = [
+ authHelper.fileName,
+ '-u', connectionSetting.uuid,
+ '-n', connectionSetting.id,
+ '-s', serviceType,
+ ];
if (authHelper.externalUIMode)
argv.push('--external-ui-mode');
if (flags & NM.SecretAgentGetSecretsFlags.ALLOW_INTERACTION)
factory.add_account_features([Tp.Account.get_feature_quark_connection()]);
factory.add_connection_features([Tp.Connection.get_feature_quark_contact_list()]);
factory.add_channel_features([Tp.Channel.get_feature_quark_contacts()]);
- factory.add_contact_features([Tp.ContactFeature.ALIAS,
- Tp.ContactFeature.AVATAR_DATA,
- Tp.ContactFeature.PRESENCE,
- Tp.ContactFeature.SUBSCRIPTION_STATES]);
+ factory.add_contact_features([
+ Tp.ContactFeature.ALIAS,
+ Tp.ContactFeature.AVATAR_DATA,
+ Tp.ContactFeature.PRESENCE,
+ Tp.ContactFeature.SUBSCRIPTION_STATES,
+ ]);
// Set up a SimpleObserver, which will call _observeChannels whenever a
// channel matching its filters is detected.
var MAX_CANDIDATES_PER_PAGE = 16;
-var DEFAULT_INDEX_LABELS = ['1', '2', '3', '4', '5', '6', '7', '8',
- '9', '0', 'a', 'b', 'c', 'd', 'e', 'f'];
+var DEFAULT_INDEX_LABELS = [
+ '1', '2', '3', '4', '5', '6', '7', '8', '9', '0',
+ 'a', 'b', 'c', 'd', 'e', 'f',
+];
var CandidateArea = GObject.registerClass({
Signals: {
- 'candidate-clicked': { param_types: [GObject.TYPE_UINT,
- GObject.TYPE_UINT,
- Clutter.ModifierType.$gtype] },
+ 'candidate-clicked': {
+ param_types: [
+ GObject.TYPE_UINT, GObject.TYPE_UINT, Clutter.ModifierType.$gtype,
+ ],
+ },
'cursor-down': {},
'cursor-up': {},
'next-page': {},
}
let scaleFactor = St.ThemeContext.get_for_stage(global.stage).scale_factor;
- let [xFocus, yFocus] = [(extents.x + (extents.width / 2)) * scaleFactor,
- (extents.y + (extents.height / 2)) * scaleFactor];
+ const [xFocus, yFocus] = [
+ (extents.x + (extents.width / 2)) * scaleFactor,
+ (extents.y + (extents.height / 2)) * scaleFactor,
+ ];
if (this._xFocus !== xFocus || this._yFocus !== yFocus) {
[this._xFocus, this._yFocus] = [xFocus, yFocus];
let roiWidth = this._viewPortWidth / this._xMagFactor;
let roiHeight = this._viewPortHeight / this._yMagFactor;
- return [this._xCenter - roiWidth / 2,
- this._yCenter - roiHeight / 2,
- roiWidth, roiHeight];
+ return [
+ this._xCenter - roiWidth / 2,
+ this._yCenter - roiHeight / 2,
+ roiWidth, roiHeight,
+ ];
}
/**
_screenToViewPort(screenX, screenY) {
// Converts coordinates relative to the (unmagnified) screen to coordinates
// relative to the origin of this._magView
- return [this._viewPortWidth / 2 + (screenX - this._xCenter) * this._xMagFactor,
- this._viewPortHeight / 2 + (screenY - this._yCenter) * this._yMagFactor];
+ return [
+ this._viewPortWidth / 2 + (screenX - this._xCenter) * this._xMagFactor,
+ this._viewPortHeight / 2 + (screenY - this._yCenter) * this._yMagFactor,
+ ];
}
_updateMagViewGeometry() {
this._connectContainer(container);
let [min, nat] = super.vfunc_get_preferred_width(container, forHeight);
- return [Math.floor(min * container.scale_x),
- Math.floor(nat * container.scale_x)];
+ return [
+ Math.floor(min * container.scale_x),
+ Math.floor(nat * container.scale_x),
+ ];
}
vfunc_get_preferred_height(container, forWidth) {
this._connectContainer(container);
let [min, nat] = super.vfunc_get_preferred_height(container, forWidth);
- return [Math.floor(min * container.scale_y),
- Math.floor(nat * container.scale_y)];
+ return [
+ Math.floor(min * container.scale_y),
+ Math.floor(nat * container.scale_y),
+ ];
}
});
if (children[1]) {
let [min2, nat2] = children[1].get_preferred_height(forWidth);
- let [expMin, expNat] = [Math.min(min2, min * this._expandLines),
- Math.min(nat2, nat * this._expandLines)];
- [min, nat] = [min + this._expansion * (expMin - min),
- nat + this._expansion * (expNat - nat)];
+ const [expMin, expNat] = [
+ Math.min(min2, min * this._expandLines),
+ Math.min(nat2, nat * this._expandLines),
+ ];
+ [min, nat] = [
+ min + this._expansion * (expMin - min),
+ nat + this._expansion * (expNat - nat),
+ ];
}
return [min, nat];
_imageForNotificationData(hints) {
if (hints['image-data']) {
- let [width, height, rowStride, hasAlpha,
- bitsPerSample, nChannels_, data] = hints['image-data'];
+ const [
+ width, height, rowStride, hasAlpha,
+ bitsPerSample, nChannels_, data,
+ ] = hints['image-data'];
return Shell.util_create_pixbuf_from_data(data, GdkPixbuf.Colorspace.RGB, hasAlpha,
bitsPerSample, width, height, rowStride);
} else if (hints['image-path']) {
}
_notifyForSource(source, ndata) {
- let [id_, icon, summary, body, actions, hints, notification] =
- [ndata.id, ndata.icon, ndata.summary, ndata.body,
- ndata.actions, ndata.hints, ndata.notification];
+ const { icon, summary, body, actions, hints } = ndata;
+ let { notification } = ndata;
if (notification == null) {
notification = new MessageTray.Notification(source);
} else if (meta['gicon']) {
gicon = Gio.icon_new_for_string(meta['gicon']);
} else if (meta['icon-data']) {
- let [width, height, rowStride, hasAlpha,
- bitsPerSample, nChannels_, data] = meta['icon-data'];
+ const [
+ width, height, rowStride, hasAlpha,
+ bitsPerSample, nChannels_, data,
+ ] = meta['icon-data'];
gicon = Shell.util_create_pixbuf_from_data(data, GdkPixbuf.Colorspace.RGB, hasAlpha,
bitsPerSample, width, height, rowStride);
}
const DEFAULT_MODE = 'restrictive';
+const USER_SESSION_COMPONENTS = [
+ 'polkitAgent', 'telepathyClient', 'keyring',
+ 'autorunManager', 'automountManager',
+];
+
+if (Config.HAVE_NETWORKMANAGER)
+ USER_SESSION_COMPONENTS.push('networkAgent');
+
const _modes = {
'restrictive': {
parentMode: null,
isLocked: false,
isPrimary: true,
unlockDialog: imports.ui.unlockDialog.UnlockDialog,
- components: Config.HAVE_NETWORKMANAGER
- ? ['networkAgent', 'polkitAgent', 'telepathyClient',
- 'keyring', 'autorunManager', 'automountManager']
- : ['polkitAgent', 'telepathyClient',
- 'keyring', 'autorunManager', 'automountManager'],
-
+ components: USER_SESSION_COMPONENTS,
panel: {
left: ['activities', 'appMenu'],
center: ['dateMenu'],
});
var ShellMountPasswordDialog = GObject.registerClass({
- Signals: { 'response': { param_types: [GObject.TYPE_INT,
- GObject.TYPE_STRING,
- GObject.TYPE_BOOLEAN,
- GObject.TYPE_BOOLEAN,
- GObject.TYPE_BOOLEAN,
- GObject.TYPE_UINT] } },
+ Signals: {
+ 'response': {
+ param_types: [
+ GObject.TYPE_INT,
+ GObject.TYPE_STRING,
+ GObject.TYPE_BOOLEAN,
+ GObject.TYPE_BOOLEAN,
+ GObject.TYPE_BOOLEAN,
+ GObject.TYPE_UINT,
+ ],
+ },
+ },
}, class ShellMountPasswordDialog extends ModalDialog.ModalDialog {
_init(message, flags) {
let strings = message.split('\n');
// for those we don't actually display.
return this.get_children().reduce((maxWidth, child) => {
let width = child.get_preferred_width(forHeight);
- return [Math.max(maxWidth[0], width[0]),
- Math.max(maxWidth[1], width[1])];
+ return [
+ Math.max(maxWidth[0], width[0]),
+ Math.max(maxWidth[1], width[1]),
+ ];
}, [0, 0]);
}
vfunc_get_preferred_height(forWidth) {
return this.get_children().reduce((maxHeight, child) => {
let height = child.get_preferred_height(forWidth);
- return [Math.max(maxHeight[0], height[0]),
- Math.max(maxHeight[1], height[1])];
+ return [
+ Math.max(maxHeight[0], height[0]),
+ Math.max(maxHeight[1], height[1]),
+ ];
}, [0, 0]);
}
this._nmDevices = [];
this._devices = { };
- let categories = [NMConnectionCategory.WIRED,
- NMConnectionCategory.WIRELESS,
- NMConnectionCategory.WWAN];
+ const categories = [
+ NMConnectionCategory.WIRED,
+ NMConnectionCategory.WIRELESS,
+ NMConnectionCategory.WWAN,
+ ];
for (let category of categories) {
this._devices[category] = new DeviceCategory(category);
this.menu.addMenuItem(this._devices[category]);
}
_minimizeWindow(shellwm, actor) {
- let types = [Meta.WindowType.NORMAL,
- Meta.WindowType.MODAL_DIALOG,
- Meta.WindowType.DIALOG];
+ const types = [
+ Meta.WindowType.NORMAL,
+ Meta.WindowType.MODAL_DIALOG,
+ Meta.WindowType.DIALOG,
+ ];
if (!this._shouldAnimateActor(actor, types)) {
shellwm.completed_minimize(actor);
return;
}
_unminimizeWindow(shellwm, actor) {
- let types = [Meta.WindowType.NORMAL,
- Meta.WindowType.MODAL_DIALOG,
- Meta.WindowType.DIALOG];
+ const types = [
+ Meta.WindowType.NORMAL,
+ Meta.WindowType.MODAL_DIALOG,
+ Meta.WindowType.DIALOG,
+ ];
if (!this._shouldAnimateActor(actor, types)) {
shellwm.completed_unminimize(actor);
return;
if (actor.meta_window.is_attached_dialog())
this._checkDimming(actor.get_meta_window().get_transient_for());
- let types = [Meta.WindowType.NORMAL,
- Meta.WindowType.DIALOG,
- Meta.WindowType.MODAL_DIALOG];
+ const types = [
+ Meta.WindowType.NORMAL,
+ Meta.WindowType.DIALOG,
+ Meta.WindowType.MODAL_DIALOG,
+ ];
if (!this._shouldAnimateActor(actor, types)) {
shellwm.completed_map(actor);
return;
if (window.is_attached_dialog())
this._checkDimming(window.get_transient_for());
- let types = [Meta.WindowType.NORMAL,
- Meta.WindowType.DIALOG,
- Meta.WindowType.MODAL_DIALOG];
+ const types = [
+ Meta.WindowType.NORMAL,
+ Meta.WindowType.DIALOG,
+ Meta.WindowType.MODAL_DIALOG,
+ ];
if (!this._shouldAnimateActor(actor, types)) {
shellwm.completed_destroy(actor);
return;
- 'CallExpression[callee.object.name=GObject][callee.property.name=registerClass] > ClassExpression:first-child'
CallExpression:
arguments: first
- ArrayExpression: first
ObjectExpression: first
MemberExpression: off
jsdoc/check-alignment: off